package com.oreilly.ez.entity;


import com.oreilly.ez.vo.EzDetailVO;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.ArrayList;
import java.util.List;

@Data
@Entity
@Table(name = "ez_index")
@ToString
public class EzIndex  extends BaseEntity {


  // new field...

    @ManyToOne
    @JoinColumn(name = "fk_cate_id")
    private EzCate ezCate;


    @Transient
    private List<EzDetailVO> detailList = new ArrayList<>();
}
